package four_File;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class TryInput {
    public static void main(String[] args) {
        FileInputStream fis = null;
        try {
            fis = new FileInputStream("mian\\src\\four_File\\temp.txt");

//            int by;

//            while((by = fis.read()) != -1) {
//                System.out.print((char) by);
//            }

            int len;
            byte[] bytes = new byte[1034];
            while ((len = fis.read(bytes)) != -1) {
                System.out.print(new String(bytes, 0, len));
            }

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (fis != null) {
                try {
                    fis.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
